Migration navigation from InteractionManager to TransitionTracker#82587
Draft
blazejkustra wants to merge 37 commits intoExpensify:mainfrom
Draft
Migration navigation from InteractionManager to TransitionTracker#82587blazejkustra wants to merge 37 commits intoExpensify:mainfrom
blazejkustra wants to merge 37 commits intoExpensify:mainfrom
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
…or improved readability and error handling
…for improved readability
…s and improve formatting
…w guidelines for using Navigation with waitForTransition. Update various files to reflect the new categorization
war-in
reviewed
Feb 19, 2026
src/libs/Navigation/PlatformStackNavigation/createPlatformStackNavigatorComponent/index.tsx
Outdated
Show resolved
Hide resolved
…itForTransition` waits for all ongoing transitions to finish before navigating.
…d simplify screen layout integration in createPlatformStackNavigatorComponent.
…ConfirmModal hook, clarifying that showConfirmModal resolves after modal close transition completes, eliminating the need for explicit afterTransition callbacks.
war-in
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
This PR introduces the TransitionTracker and migrates the first batch of
InteractionManagerusages in navigation code to use it.TransitionTracker (
src/libs/Navigation/TransitionTracker.ts) is a new module that explicitly tracks active transitions (navigation, modal, keyboard, focus) using a counted map. It exposesstartTransition/endTransitionto mark transition boundaries, andrunAfterTransitionsto queue callbacks that fire once all transitions are idle. A safety timeout (1s) auto-ends transitions that are never explicitly closed.On top of TransitionTracker, existing APIs gain transition-aware options:
Navigation.navigate,goBack, anddismissModalnow acceptwaitForTransition(defer the navigation until ongoing transitions finish) andafterTransition(run a callback after the triggered transition completes). This replaces the old pattern of wrapping navigation calls inInteractionManager.runAfterInteractions.dismissModalWithReportusesafterTransitioninstead of the oldDeviceEventEmitter-basedMODAL_EVENTS.CLOSEDcallback pattern. TheMODAL_EVENTS.CLOSEDconstant and its associatedDeviceEventEmitteremissions inBaseModalandRightModalNavigatorare removed.KeyboardUtils.dismissnow accepts{ afterTransition, shouldSkipSafari }instead of a bare boolean, and tracks keyboard show/hide as a transition type.ScreenLayout(src/libs/Navigation/PlatformStackNavigation/ScreenLayout.tsx) is a new component wired into the web stack navigator viascreenLayoutprop. It listens totransitionStart/transitionEndevents to feed TransitionTracker.ReanimatedModalnow callsTransitionTracker.startTransition('modal')/endTransition('modal')alongside the existingInteractionManagerhandles.Concrete migration examples in this PR:
WorkspaceCategoriesSettingsPageandWorkspaceCreateTagPagereplaceKeyboard.dismiss()+InteractionManagerwithKeyboardUtils.dismiss({ afterTransition }).WorkspaceInviteMessageComponent,NewChatPage,TransactionReceiptModalContent, andReport/index.tsreplacedismissModal({ callback })withdismissModal({ afterTransition }).Fixed Issues
$ #71913
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
iOS: Native
Start new chat:
stat-new-chat-ios.mov
Workspace invite:
workspace-invite-ios.mov
Create group:
create-group-ios.mov
Replace receipt:
replace-receipt-ios.mov
Keyboard behaviour:
keyboard-ios.mov
MacOS: Chrome / Safari
Start new chat:
https://github.com/user-attachments/assets/8c36c37f-d457-41ea-8c0c-8b916e129e88
Workspace invite:
https://github.com/user-attachments/assets/ee5d5813-4546-4cef-8464-b4f85261bea6
Create group:
https://github.com/user-attachments/assets/9af3067b-d93b-42c0-97a2-1ab7d03e7cfa
Replace receipt:
https://github.com/user-attachments/assets/99405a86-deb1-4f3b-b229-9fcd23ebfcf4